package com.itheima.exerciseTest.test10_19;

import java.math.BigDecimal;

public class Test14 {
    public static void main(String[] args) {
        BigDecimal bd1 = new BigDecimal("7654321");
        BigDecimal bd2 = new BigDecimal("1234567");

        // 和
        System.out.println("和 " + bd1.add(bd2));

        // 差
        System.out.println("差 " + bd1.subtract(bd2));

        // 积
        System.out.println("积 " + bd1.multiply(bd2));

        // 商
        System.out.println("商 " + bd1.divide(bd2,20,BigDecimal.ROUND_HALF_UP));
    }
}
